import React from 'react'

import '@/assets/css/OrderComment.scoped.css'

const Component = () =>
{
  //外卖信息
  let [food, SetFood] = useState({
    name: '香辣鸡腿中国汉堡+翅根+冰柠可乐',
    price: '12'
  })

  let [remark, SetRemark] = useState('')
  let [rate, SetRate] = useState(3)

  const submit = () => React.toast('评论成功', 'back')

  return (
    <>
      <div className="FoodInfo">
          <div className="thumb">
              <img src={require("@/assets/images/food1.png")} />
          </div>
          <div className="right">
              <p>{food.name}</p>
              <p>￥{food.price}元</p>
          </div>
      </div>

      <div className='FoodItem'>
        <div className="tips">评论内容</div>
        <React.UI.Rate value={rate} onChange={SetRate} />
      </div>

      <div className='FoodItem'>
        <div className="tips">评论内容</div>
        <React.UI.Input placeholder="请输入评论内容" value={remark} onChange={SetRemark} clearable />
      </div>

      <div className='FoodBtn'>
        <React.UI.Button color='primary' onClick={submit}>提交评论</React.UI.Button>
      </div>
    </>
  )
}

export default Component